package cn.hahah.module.blog.dal.mysql.userdialoguegroup;

import java.util.*;

import cn.hahah.framework.common.pojo.PageResult;
import cn.hahah.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.hahah.framework.mybatis.core.mapper.BaseMapperX;
import cn.hahah.module.blog.dal.dataobject.userdialoguegroup.UserDialogueGroupDO;
import org.apache.ibatis.annotations.Mapper;
import cn.hahah.module.blog.controller.admin.userdialoguegroup.vo.*;

/**
 * 用户对话分组 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserDialogueGroupMapper extends BaseMapperX<UserDialogueGroupDO> {

    default PageResult<UserDialogueGroupDO> selectPage(UserDialogueGroupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserDialogueGroupDO>()
                .likeIfPresent(UserDialogueGroupDO::getName, reqVO.getName())
                .betweenIfPresent(UserDialogueGroupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserDialogueGroupDO::getId));
    }

}